package com.gxuwz.cyhschool;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import org.json.JSONObject;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class balance extends AppCompatActivity implements View.OnClickListener {
    private Button  kye_btn;
    private TextView kye_money;
    private Double money,addMoney;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_balance);
        getSupportActionBar().hide();
        Intent intent = getIntent();

        addMoney = intent.getDoubleExtra("money",0);
        kye_btn = findViewById(R.id.btn_cz);
        kye_money = findViewById(R.id.tv_yue);
        kye_btn.setOnClickListener(this);

        kye_money.setText("59.86元");

        getSupportActionBar().hide();
        ImageView imageView=findViewById(R.id.iv_return);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()) {
            case R.id.iv_return:
                intent.setClass(balance.this,MainActivity.class);
                startActivity(intent);
                return;
            case R.id.btn_cz:
                intent.setClass(balance.this, recharge.class);
                startActivity(intent);
                return;
        }
    }


}